package com.vlin.errorcode;

public enum ErrorCode {

	SYSTEM_ERROR(500,"system error,please contact the admin","系统错误，请联系管理员"),
	DATE_NOT_EXIST(1000,"data not exist","数据不存在"),
	SECRET_INVALID(1001,"secret invalid","密钥非法"),
	ACCESS_TOKEN_NULL(1002,"access_token is null","访问令牌为空"),
	GRANT_TYPE_INVALID(1003,"grant type invalid","grant type 无效"),
	SIGN_INVALID(1004,"sign invalid","签名无效"),
	APPKEY_INVALID(1005,"appkey invalid","appkey 无效"),
	CONTENT_TYPE_NOT_SUPPORT(1006,"not support content type","不支持的content type"),
	APP_KEY_NOT_SUPPORT(1007,"not support appkey","不支持的appkey，请使用云端key"),
	TOKEN_EXPIERD(1010,"token is expired","token过期"),
	TOKEN_INVALID(1011,"token invalid","token无效"),
	TOKEN_STATUS_INVALID(1012,"token status is invalid","token状态无效"),
	REQUEST_TIME_INVALID(1013,"request time is invalid","请求时间无效"),
	PARAMS_EMPTY(1100,"params is empty","参数为空"),
	PARAMS_RANGE_INVALID(1101,"params range invalid","参数范围无效"),
	PARAMS_NULL(1102,"params is null","参数为null"),
	COMMANDS_ERROR(1103,"commands issue error","指令下发失败"),
	TYPE_INCORRECT(1104,"type is incorrect","类型不正确"),
	HEADER_MISS(1105,"missing the header","缺少header"),
	PERMISSION_DENY(1106,"permission deny","权限非法"),
	CODE_INVALID(1107,"code invalid","code无效"),
	URL_INVALID(1108,"uri path invalid","url无效"),
	DEVICE_OFFLINE(2001,"device is offline","设备离线"),
	DEVICES_NULL(2002,"this user dosen`t have any devices","用户账号下设备为空"),
	FUNCTION_NOT_SUPPORT(2003,"function not support","指令不支持"),
	LOCK_TYPE_NOT_SUPPORT(2004,"not support the lock type","不支持的锁类型"),
	PRODUCT_NOT_SUPPORT(2005,"product not exist","产品不存在"),
	USER_NOT_EXIST(2006,"user not exist","用户不存在"),
	DEVICE_TOKEN_EXPIRED(2007,"device token expired","设备token过期"),
	COMMAND_VALUE_NOT_SUPPORT(2008,"command or value not support","指令或值不支持"),
	DEVICE_NOT_SUPPORT(2009,"not support this device","不支持此类设备"),
	DEVICE_NOT_EXIST(2010,"device not exist","设备不存在"),
	APPLICATION_NOT_SUPPORT(2012,"application not support ","应用不存在"),
	ADD_TIMER_FAILED(2013,"add timer failed","添加定时任务失败"),
	DEVICE_NOT_HAVE_TIMERS(2014,"this device dosen`t have any timers","设备没有任何定时任务"),
	CATEGORY_NOT_SUPPORT(2015,"this category is not supported","该分类不支持");
	
	private int code;
	
	private String msg;
	
	private String explain;
	
	ErrorCode(int code, String msg, String explain) {
		this.code = code;
		this.msg =msg;
		this.explain = explain;
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}


	public String getExplain() {
		return explain;
	}

	
}
